-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for issue 4682 : Restructuring the side pane structure having additional functionality and merging the remove group menus #7714
Conversation
…ps and Remove group, keep subgroup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks already good!
From my side only a few small remarks/suggestions regarding the code style
Please look at the failing unit + checkstyle /reviewdog and also change the PR title to a more meaningful name |
private void setNewGroupButtonStyle(TreeTableView<GroupNodeViewModel> groupTree) { | ||
if (groupTree.getRoot() != null) { | ||
if (groupTree.getExpandedItemCount() <= 10) { | ||
addNewGroup.setStyle("-fx-border-width: 0px; -fx-background-color: -jr-theme;" + | ||
" -fx-padding: 0.5em; -fx-text-fill: -jr-white;"); | ||
} else { | ||
addNewGroup.setStyle("-fx-border-width: 0px; -fx-background-color: -jr-icon-background-active;" + | ||
" -fx-padding: 0.5em; -fx-text-fill: -jr-black;"); | ||
} | ||
} else { | ||
addNewGroup.setStyle("-fx-border-width: 0px; -fx-background-color: -jr-theme;" + | ||
" -fx-padding: 0.5em; -fx-text-fill: -jr-white;"); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of hardcoding the css in the java file, please make this a pseudoclass in css, which should be very easy to implement. See BindingsHelper::includePseudoClassWhen
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @calixtus , i've checked this BindingsHelper::includePseudoClassWhen
needs a parameter of node
and the css changes should be applied to the nodes whenever a condition is applied. however, in my change, what I'm changing is the color of Add Group
button whenever the user added 10 groups (doesn't include the count of subgroups) and not the nodes. Any advise is greatly appreciated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The node should be the addNewGroup.
A new Binding to be checked for can be created in some initialize method or the constructor of the class. You only need one Observable which is triggered when change to the list happens.
Please take a look at other occurences of includePseudoClassWhen to get an impression, how to implement this. Again, in theory this should be very straightforward. If you really don't get this to work, I can help a little bit in the next days, im just a bit busy today.
@@ -1782,7 +1782,7 @@ No\ full\ text\ document\ found\ for\ entry\ %0.=No full text document found for | |||
Delete\ Entry=Delete Entry | |||
Next\ library=Next library | |||
Previous\ library=Previous library | |||
add\ group=add group | |||
add\ group=Add group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translation string must be consistent with english translation.
add\ group=Add group | |
Add\ group=Add group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small remarks
@Siedlerchr , I am sorry I'm new in checking the unit test. Is it possible if you can point me to the right direction on how to check it? I've clicked the details and directed me to a https://github.com/JabRef/jabref/pull/7714/checks?check_run_id=2604593213 but not sure how to investigate on the code itself on how to debug it and fix it. |
…nd removed unused entries in english language file
The provided link returns me a 404 😞 |
The checkstyle fails on checking the changelog file and says the following;
Looks just like you forgot a blank line before or after a heading in changelog.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few comments
|
||
#newGroupButton { | ||
-fx-padding: 0.1em 1.5em 0.1em 1.5em; | ||
#addNewGroup { | ||
/*-fx-padding: 0.1em 1.5em 0.1em 1.5em;*/ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why keeping it, when commented? For version history we got git.
CHANGELOG.md
Outdated
### Removed | ||
- We removed add group button beside the filter group tab. [#4682](https://github.com/JabRef/jabref/issues/4682) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep a blank line before and after a heading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a blank line after the heading "#Removed"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, Visual Studio Code helps - with following plugin: https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
I am not aware of any similar plugin for IntelliJ.
private void setNewGroupButtonStyle(TreeTableView<GroupNodeViewModel> groupTree) { | ||
if (groupTree.getRoot() != null) { | ||
if (groupTree.getExpandedItemCount() <= 10) { | ||
addNewGroup.setStyle("-fx-border-width: 0px; -fx-background-color: -jr-theme;" + | ||
" -fx-padding: 0.5em; -fx-text-fill: -jr-white;"); | ||
} else { | ||
addNewGroup.setStyle("-fx-border-width: 0px; -fx-background-color: -jr-icon-background-active;" + | ||
" -fx-padding: 0.5em; -fx-text-fill: -jr-black;"); | ||
} | ||
} else { | ||
addNewGroup.setStyle("-fx-border-width: 0px; -fx-background-color: -jr-theme;" + | ||
" -fx-padding: 0.5em; -fx-text-fill: -jr-white;"); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The node should be the addNewGroup.
A new Binding to be checked for can be created in some initialize method or the constructor of the class. You only need one Observable which is triggered when change to the list happens.
Please take a look at other occurences of includePseudoClassWhen to get an impression, how to implement this. Again, in theory this should be very straightforward. If you really don't get this to work, I can help a little bit in the next days, im just a bit busy today.
This also gives us an error 404 and was about raise it as well. The provided link for |
Added a blank line after the heading "#Removed"
The HelpFileTests are unrelated to your changes and are caused bay changes to our help system gitbook. They should be gone after merging the most recent main-branch into your branch an can be ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay here, we all were a bit busy the last few weeks.
One quick question on this one, everything else looks good to me.
From my side lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for this contribution. I personally want to add that I really appreciate your Will to stay on this, fix issues with the PR and including our remarks, until the PR can be merged!
Merging now!
* upstream/main: Added auto-key-generation task to task-progress (JabRef#7797) cleanup temporary files, use prefix "jabref-" (JabRef#7811) Add easier how-to for checklist (JabRef#7813) Fix annotation + package of ACMPortalParserTest (JabRef#7812) Implemented a select all button for the library import function (issue JabRef#7786) (JabRef#7808) Fix for issue 4682 : Restructuring the side pane structure having additional functionality and merging the remove group menus (JabRef#7714)
Rearrange side pane structure having add button moved to the bottom of the side pane and merging the remove group menus.
Fixes #4682
Following are the changes that we implemented:
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)